#ifndef __GE_RENDERABLE_H__
#define __GE_RENDERABLE_H__

#include "GE_Base.h"
namespace Syp
{
///A Renderable is produced when a MeshInstance is placed into the SceneManager. A MeshInstance might require multiple draw calls because of having multiple materials/shaders for 1 mesh. A Renderable is generated for each draw call. The Reason for the existance of a Renderable object is so that the engine may sort/batch by draw calls rather then Meshes which can become quite complicated.
///A Renderable is not dynamically allocated because the SceneManager's RenderQue needs to hold the actual object itself so that it may be sorted by the Renderable instead of it's pointer values.
class Renderable
{
public:
	bool operator<(const Renderable& r) const;
	bool operator==(const Renderable& r) const;
	Renderable():parent(0),indexBlock(0),pass(0)
	{
	};
	///The parent MeshInstance
	MeshInstance* parent;
	///The drawcall it represents.
	PByte indexBlock;	
	///Pass being used by the Renderable
	Pass* pass;
};

//bool operator==(const Renderable& l,const Renderable& r);
}
#endif //__GE_RENDERABLE_H__

